<Workflow Name="CruxSampleWorkflow" Type="something" StartActivity="RequestCreation" EndActivity="End" EmailNotificationsOnStateChange="True">
  <Activities>
    <Activity Name="RequestCreation" NextActivity="DriverInput" State="RequestCreation" PreviousActivity="None">
      <Actions>
        <Action Name="IndividualLotManagement" ResultantActivity="IndividualLotManagement" />
      </Actions>
    </Activity>

    <!-- Lot Based Activities For A Sub Workflow Fork And Join. -->
    <Activity Name="IndividualLotManagement"
      State="IndividualLotManagement">
      <Actions>
        <Action Name="End" ResultantActivity="End" />
      </Actions>
      <MailAction Name="SampleEmail"></MailAction>
    </Activity>

  <Activity Name="End" NextActivity="None"
          State="WorkflowEnded" PreviousActivity="ReceivingDepartmentValidation"/>
  </Activities>

  <RoutingRules>
    <Rule Name="EftInBox">
      <Condition Type="And">
        <Roles>
          <Role Name="Administrator" />
        </Roles>
        <Users>
          <User State="StartWorkflow" />
        </Users>
      </Condition>
      <Condition Type="Or">
        <Roles>
          <Role Name="sa" />
        </Roles>
        <Users>
          <User State="ReceivingDepartmentValidation" />
        </Users>
      </Condition>
      <Override>
        <Condition Type="And">
          <Users>
            <User State="Orgignate" />
          </Users>
        </Condition>
      </Override>
      <Condition Type="Order">
        <UserStates>
          <State Name="RequestCreation" Order="1" />
          <State Name="DriverInput" Order="2" />
        </UserStates>
      </Condition>
    </Rule>
  </RoutingRules>

</Workflow>